package org.mech.sefer.client.ui.spring.task;

import org.mech.sefer.client.ui.task.callback.TaskCallback;

/**
 * <p>
 * The TaskService is service that starts Reflection task with givent callback
 * </p>
 * <p>
 * Date: 26.4.2012 10:35:52
 * </p>
 * 
 * @author martin.krajc
 */
public interface TaskService {

	/**
	 * Call the method on interface with given callback passing arguments. This
	 * method will try to find {@link ReflectionTask} in {@link TaskRegistry}
	 * and pass execution to executor.
	 * 
	 * @param <T>
	 *            the generic type
	 * @param interfaceClass
	 *            the interface class
	 * @param methodName
	 *            the method name
	 * @param callBack
	 *            the call back
	 * @param args
	 *            the args
	 */
	<T> void call(Class<?> interfaceClass, String methodName,
			TaskCallback<T> callBack, Object... args);

}
